package research.ui.editors.tableeditors;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;

import research.entity.Entity;

public class EntitySorter extends ViewerSorter {

	public int compare(Viewer viewer, Object o1, Object o2) {

		Entity for1 = (Entity) o1;
		Entity for2 = (Entity) o2;

		if (for1.equals(for2))
			return 0;
	
		return for1.toString().compareTo(for2.toString());
	}
}